home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
pdflib
/
bindings
/
perl
/
hello.pl
next >
Wrap
Perl Script
|
1999-09-16
|
486b
|
22 lines
#!/usr/bin/perl
use pdflib;
package pdflib;
$fp = fopen("hello_perl.pdf", "w");
$ip = PDF_get_info();
$ip->{Creator} = "hello.pl";
$ip->{Author} = "RJS";
$ip->{Title} = "Hello world (Perl)";
$ip->{fontpath} = "../../fonts";
$p = PDF_open($fp, $ip);
PDF_begin_page($p, $a4->{width}, $a4->{height});
PDF_set_font($p, "Helvetica-Bold", 18.0, $winansi);
PDF_set_text_pos($p, 50, 700);
PDF_show($p, "Hello world!");
PDF_continue_text($p, "(says Perl)");
PDF_end_page($p);
PDF_close($p);